﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:EAppointmentsWPF="clr-namespace:EAppointmentsWPF"
	xmlns:dc="clr-namespace:Microsoft.Samples.KMoore.WPFSamples.DateControls;assembly=WPFSamplesLib"
	xmlns:sys="clr-namespace:System;assembly=mscorlib"
	xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Luna"
	xmlns:Microsoft_Windows_Themes1="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
	x:Class="EAppointmentsWPF.DateView"
	x:Name="DateViewControl"
	Width="233.174" Height="599" Loaded="DateViewControl_Loaded">
	
	<UserControl.Resources>
	<ResourceDictionary>
            	<!-- Dictionaries-->
            	<ResourceDictionary.MergedDictionaries>
	                <ResourceDictionary Source="..\Resources\ControlStyles\Brushes.xaml"/>
                	<ResourceDictionary Source="..\Resources\ControlStyles\Buttons.xaml"/>
                	<ResourceDictionary Source="..\Resources\ControlStyles\ComboBox.xaml"/>
                	<ResourceDictionary Source="..\Resources\ControlStyles\CheckBox.xaml"/>
                    <ResourceDictionary Source="..\Resources\ControlStyles\DatePicker.xaml"/>
                	<ResourceDictionary Source="..\Resources\ControlStyles\ListBox.xaml"/>
					<ResourceDictionary Source="..\Resources\ControlStyles\ListView.xaml"/>
                	<ResourceDictionary Source="..\Resources\ControlStyles\Styles.xaml"/>
            	</ResourceDictionary.MergedDictionaries>
			
	
	<Style x:Key="RadioButtonListStyle" TargetType="{x:Type ListBox}">
			<Setter Property="HorizontalAlignment" Value="Center"/>
			<Setter Property="VerticalAlignment" Value="Center"/>
			<Setter Property="BorderBrush" Value="Transparent"/>
			<Setter Property="KeyboardNavigation.DirectionalNavigation" Value="Cycle"/>
			<Setter Property="ItemContainerStyle">
				<Setter.Value>
					<Style TargetType="{x:Type ListBoxItem}" >
						<Setter Property="Margin" Value="10, 10, 5, 0" />
						<Setter Property="Template">
							<Setter.Value>
								<ControlTemplate TargetType="{x:Type ListBoxItem}">
									<Border Background="Transparent" Height="16.216" Width="226.384">
										<RadioButton IsHitTestVisible="False"
																Focusable="False"
																IsChecked="{Binding Path=IsSelected,RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}"
																Content="{TemplateBinding Content}"  Style="{DynamicResource RadioButtonStyle1}"  />
									</Border>
								</ControlTemplate>
							</Setter.Value>
						</Setter>
					</Style>
				</Setter.Value>
			</Setter>
		<Setter Property="Template" Value="{DynamicResource ListBoxControlTemplate1}"/>
		</Style>
		
		
		
				
		
		
		<Style x:Key="RadioButtonStyle1" TargetType="{x:Type RadioButton}">
			<Setter Property="FocusVisualStyle">
				<Setter.Value>
					<Style>
						<Setter Property="Control.Template">
							<Setter.Value>
								<ControlTemplate>
									<Rectangle SnapsToDevicePixels="True" Stroke="#FF000000" StrokeDashArray="1 2" StrokeThickness="1" Margin="14,0,0,0"/>
								</ControlTemplate>
							</Setter.Value>
						</Setter>
					</Style>
				</Setter.Value>
			</Setter>
			<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
			<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
			<Setter Property="Padding" Value="2,0,0,0"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type RadioButton}">
						<BulletDecorator Background="#00FFFFFF">
							<BulletDecorator.Bullet>
								<Microsoft_Windows_Themes1:ClassicBorderDecorator x:Name="Border" Width="12" Height="12" Background="{TemplateBinding Background}" BorderStyle="RadioButton" BorderThickness="4,4,5,5">
									<Ellipse Visibility="Hidden" Fill="{TemplateBinding Foreground}" x:Name="Dot" Width="4" Height="4"/>
								</Microsoft_Windows_Themes1:ClassicBorderDecorator>
							</BulletDecorator.Bullet>
							<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="5,0,0,0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" RecognizesAccessKey="True" Height="17.616"/>
						</BulletDecorator>
						<ControlTemplate.Triggers>
							<Trigger Property="IsChecked" Value="True">
								<Setter Property="Visibility" TargetName="Dot" Value="Visible"/>
							</Trigger>
							<Trigger Property="IsPressed" Value="True">
								<Setter Property="Background" TargetName="Border" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
							</Trigger>
							<Trigger Property="IsEnabled" Value="False">
								<Setter Property="Background" TargetName="Border" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
								<Setter Property="Fill" TargetName="Dot" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
								<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
			
			
		<SolidColorBrush x:Key="BlackishBlueFontBrush" Color="#FF0E376F"/>
		
	</ResourceDictionary>
	</UserControl.Resources>
	<Border>
		<Grid x:Name="LayoutRoot" Width="Auto" Height="Auto" Background="{x:Null}">
			<Grid.RowDefinitions>
				<RowDefinition Height="0.473*"/>
				<RowDefinition Height="0.527*"/>
			</Grid.RowDefinitions>
			<Border Background="{x:Null}" BorderBrush="{DynamicResource ControlsBorderBrush}" BorderThickness="4,4,4,4" x:Name="Calender" Margin="0,0,0,5">
				<Grid Background="#FFFFFFFF" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
					<Border Height="31.5" Background="{DynamicResource ControlsHeaderBrush}" BorderThickness="0,0,0,1" VerticalAlignment="Top">
						<TextBlock HorizontalAlignment="Left" Margin="5,4,0,0" Width="136" Height="24" Background="{x:Null}" FontSize="16" FontWeight="Bold" Foreground="{DynamicResource LightBlueFontBrush}" Text="Date" TextWrapping="Wrap" d:IsLocked="True"/>
					</Border>
					<Border Background="{DynamicResource ControlsShadowyFadingBrush}" Margin="0,29.5,0,0" Visibility="Visible" x:Name="MonthCalender">
						<Viewbox>
							<Grid>
								<Grid.RowDefinitions>
									<RowDefinition/>
									<RowDefinition/>
									<RowDefinition/>
								</Grid.RowDefinitions>

								<Grid.ColumnDefinitions>
									<ColumnDefinition/>
									<ColumnDefinition/>
								</Grid.ColumnDefinitions>

								<TextBox IsReadOnly="True" Text="{Binding Path=SelectedDate, ElementName=monthCalendar}"
									Visibility="Visible" x:Name="txtMonthCalenderDate" VerticalAlignment="Top" Height="17.664" TextChanged="txtMonthCalenderDate_TextChanged"/>

								<dc:MonthCalendar x:Name="monthCalendar"
									HorizontalAlignment="Center" VerticalAlignment="Center"
									Height="201.819" Grid.RowSpan="3" Width="197.582" Grid.ColumnSpan="2"/>

							</Grid>
						</Viewbox>
					</Border>
					<Border Background="{DynamicResource ControlsShadowyFadingBrush}" Margin="0,29.5,0,0" x:Name="DateCalender" Visibility="Visible">
						<Grid>
							<TextBlock FontSize="15" Foreground="{DynamicResource BlackishBlueFontBrush}" Text="Start Date :" TextWrapping="NoWrap" Width="Auto" d:LayoutOverrides="Width" HorizontalAlignment="Left" Margin="8,21,0,0" VerticalAlignment="Top" Height="Auto"/>
							<TextBlock FontSize="15" Foreground="{DynamicResource BlackishBlueFontBrush}" TextWrapping="NoWrap" Text="End Date :" HorizontalAlignment="Left" Margin="8,93,0,0" Width="98.95" d:LayoutOverrides="VerticalAlignment" VerticalAlignment="Top" Height="Auto"/>
							<dc:DatePicker x:Name="cbStartingDate" Style="{DynamicResource DatePickerStyle1}" Height="25" Margin="8,47,8,0" VerticalAlignment="Top"/>
							<dc:DatePicker Style="{DynamicResource DatePickerStyle1}" x:Name="cbEndDate" Margin="8,124.327,8,0" VerticalAlignment="Top" Height="25"/>
						</Grid>
					</Border>
				</Grid>
			</Border>
			<Border BorderBrush="{DynamicResource ControlsBorderBrush}" BorderThickness="4,4,4,4" x:Name="CurrentView" Margin="0,8,0,0" VerticalAlignment="Stretch" Grid.Row="1">
				<Grid Background="{x:Null}">
					<Border Background="{DynamicResource ControlsHeaderBrush}" BorderThickness="0,1,0,0" BorderBrush="{DynamicResource ControlsBorderBrush}" Margin="0,-0.029,0,0" VerticalAlignment="Top" Height="31.5">
						<TextBlock HorizontalAlignment="Left" Margin="5,4,0,0" Width="136" Height="24" Background="{x:Null}" FontSize="16" FontWeight="Bold" Foreground="{DynamicResource LightBlueFontBrush}" Text="Current View" TextWrapping="Wrap"/>
					</Border>
					<Border Margin="0,31.471,0,0" Background="{DynamicResource ControlsShadowyFadingBrush}">
						<Viewbox HorizontalAlignment="Left" VerticalAlignment="Top" Width="Auto" Height="Auto">

							<Grid HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,0" Width="155" Height="184.094">
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="*"/>
								</Grid.ColumnDefinitions>

				
								<ListBox Grid.Row="0" Style="{StaticResource RadioButtonListStyle}" Width="Auto" HorizontalAlignment="Stretch" Margin="0,8,33.947,8" x:Name="lstRadioBtn" VerticalAlignment="Stretch" FontSize="11">
									<sys:String>All</sys:String>
									<sys:String>Booking</sys:String>
									<sys:String>Pending</sys:String>
									<sys:String>Cancelled</sys:String>
									<sys:String>Past</sys:String>
									<sys:String>Future</sys:String>
								</ListBox>
							</Grid>
						</Viewbox>
					</Border>
				</Grid>
			</Border>
		</Grid>
	</Border>
</UserControl>